package com.morningstar.qs.basic.db.bean;

import java.io.Serializable;


/**
 * This is an object that contains data related to the SessionUsageTracking table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="SessionUsageTracking"
 */

public abstract class BaseSessionUsageTracking  implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4192444486865138955L;
	
	public static String REF = "SessionUsageTracking";
	public static String PROP_SESSION_ID = "SessionId";
	public static String PROP_ONLINE_SECONDS = "OnlineSeconds";
	public static String PROP_LOGOUT_MODE = "LogoutMode";
	public static String PROP_USER_AGENT = "UserAgent";
	public static String PROP_S_S_O_INST_USER_ID = "SSOInstUserId";
	public static String PROP_USER_ID = "UserId";
	public static String PROP_USER_LOCALE = "UserLocale";
	public static String PROP_S_S_O_INST_CODE = "SSOInstCode";
	public static String PROP_ID = "Id";
	public static String PROP_LOGIN_TIMESTAMP = "LoginTimestamp";
	public static String PROP_LOGOUT_TIMESTAMP = "LogoutTimestamp";
	public static String PROP_USER_HOST = "UserHost";
	public static String PROP_LOGIN_MODE = "LoginMode";
	public static String PROP_S_S_O_SUB_INST_CODE = "SSOSubInstCode";
	public static String PROP_USER_I_P = "UserIP";


	// constructors
	public BaseSessionUsageTracking () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseSessionUsageTracking (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseSessionUsageTracking (
		java.lang.Integer id,
		java.lang.Integer userId,
		java.lang.String sessionId,
		java.lang.String loginMode,
		java.util.Date loginTimestamp) {

		this.setId(id);
		this.setUserId(userId);
		this.setSessionId(sessionId);
		this.setLoginMode(loginMode);
		this.setLoginTimestamp(loginTimestamp);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.Integer userId;
	private java.lang.String sessionId;
	private java.lang.String loginMode;
	private java.util.Date loginTimestamp;
	private java.lang.String sSOInstCode;
	private java.lang.String sSOSubInstCode;
	private java.lang.String sSOInstUserId;
	private java.lang.String logoutMode;
	private java.util.Date logoutTimestamp;
	private java.lang.Integer onlineSeconds;
	private java.lang.String userIP;
	private java.lang.String userHost;
	private java.lang.String userLocale;
	private java.lang.String userAgent;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="Id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: UserId
	 */
	public java.lang.Integer getUserId () {
		return userId;
	}

	/**
	 * Set the value related to the column: UserId
	 * @param userId the UserId value
	 */
	public void setUserId (java.lang.Integer userId) {
		this.userId = userId;
	}



	/**
	 * Return the value associated with the column: SessionId
	 */
	public java.lang.String getSessionId () {
		return sessionId;
	}

	/**
	 * Set the value related to the column: SessionId
	 * @param sessionId the SessionId value
	 */
	public void setSessionId (java.lang.String sessionId) {
		this.sessionId = sessionId;
	}



	/**
	 * Return the value associated with the column: LoginMode
	 */
	public java.lang.String getLoginMode () {
		return loginMode;
	}

	/**
	 * Set the value related to the column: LoginMode
	 * @param loginMode the LoginMode value
	 */
	public void setLoginMode (java.lang.String loginMode) {
		this.loginMode = loginMode;
	}



	/**
	 * Return the value associated with the column: LoginTimestamp
	 */
	public java.util.Date getLoginTimestamp () {
		return loginTimestamp;
	}

	/**
	 * Set the value related to the column: LoginTimestamp
	 * @param loginTimestamp the LoginTimestamp value
	 */
	public void setLoginTimestamp (java.util.Date loginTimestamp) {
		this.loginTimestamp = loginTimestamp;
	}



	/**
	 * Return the value associated with the column: SSOInstCode
	 */
	public java.lang.String getSSOInstCode () {
		return sSOInstCode;
	}

	/**
	 * Set the value related to the column: SSOInstCode
	 * @param sSOInstCode the SSOInstCode value
	 */
	public void setSSOInstCode (java.lang.String sSOInstCode) {
		this.sSOInstCode = sSOInstCode;
	}



	/**
	 * Return the value associated with the column: SSOSubInstCode
	 */
	public java.lang.String getSSOSubInstCode () {
		return sSOSubInstCode;
	}

	/**
	 * Set the value related to the column: SSOSubInstCode
	 * @param sSOSubInstCode the SSOSubInstCode value
	 */
	public void setSSOSubInstCode (java.lang.String sSOSubInstCode) {
		this.sSOSubInstCode = sSOSubInstCode;
	}



	/**
	 * Return the value associated with the column: SSOInstUserId
	 */
	public java.lang.String getSSOInstUserId () {
		return sSOInstUserId;
	}

	/**
	 * Set the value related to the column: SSOInstUserId
	 * @param sSOInstUserId the SSOInstUserId value
	 */
	public void setSSOInstUserId (java.lang.String sSOInstUserId) {
		this.sSOInstUserId = sSOInstUserId;
	}



	/**
	 * Return the value associated with the column: LogoutMode
	 */
	public java.lang.String getLogoutMode () {
		return logoutMode;
	}

	/**
	 * Set the value related to the column: LogoutMode
	 * @param logoutMode the LogoutMode value
	 */
	public void setLogoutMode (java.lang.String logoutMode) {
		this.logoutMode = logoutMode;
	}



	/**
	 * Return the value associated with the column: LogoutTimestamp
	 */
	public java.util.Date getLogoutTimestamp () {
		return logoutTimestamp;
	}

	/**
	 * Set the value related to the column: LogoutTimestamp
	 * @param logoutTimestamp the LogoutTimestamp value
	 */
	public void setLogoutTimestamp (java.util.Date logoutTimestamp) {
		this.logoutTimestamp = logoutTimestamp;
	}



	/**
	 * Return the value associated with the column: OnlineSeconds
	 */
	public java.lang.Integer getOnlineSeconds () {
		return onlineSeconds;
	}

	/**
	 * Set the value related to the column: OnlineSeconds
	 * @param onlineSeconds the OnlineSeconds value
	 */
	public void setOnlineSeconds (java.lang.Integer onlineSeconds) {
		this.onlineSeconds = onlineSeconds;
	}



	/**
	 * Return the value associated with the column: UserIP
	 */
	public java.lang.String getUserIP () {
		return userIP;
	}

	/**
	 * Set the value related to the column: UserIP
	 * @param userIP the UserIP value
	 */
	public void setUserIP (java.lang.String userIP) {
		this.userIP = userIP;
	}



	/**
	 * Return the value associated with the column: UserHost
	 */
	public java.lang.String getUserHost () {
		return userHost;
	}

	/**
	 * Set the value related to the column: UserHost
	 * @param userHost the UserHost value
	 */
	public void setUserHost (java.lang.String userHost) {
		this.userHost = userHost;
	}



	/**
	 * Return the value associated with the column: UserLocale
	 */
	public java.lang.String getUserLocale () {
		return userLocale;
	}

	/**
	 * Set the value related to the column: UserLocale
	 * @param userLocale the UserLocale value
	 */
	public void setUserLocale (java.lang.String userLocale) {
		this.userLocale = userLocale;
	}



	/**
	 * Return the value associated with the column: UserAgent
	 */
	public java.lang.String getUserAgent () {
		return userAgent;
	}

	/**
	 * Set the value related to the column: UserAgent
	 * @param userAgent the UserAgent value
	 */
	public void setUserAgent (java.lang.String userAgent) {
		this.userAgent = userAgent;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.morningstar.qs.basic.db.bean.SessionUsageTracking)) return false;
		else {
			com.morningstar.qs.basic.db.bean.SessionUsageTracking sessionUsageTracking = (com.morningstar.qs.basic.db.bean.SessionUsageTracking) obj;
			if (null == this.getId() || null == sessionUsageTracking.getId()) return false;
			else return (this.getId().equals(sessionUsageTracking.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}